﻿using IOA.MES.DataAccess.Enum;
using System.Collections.Generic;

namespace IOA.MES.PdaApi.Models.Response.Auth
{
    /// <summary>
    /// 查询仓库列表返回对象
    /// </summary>
    public class QueryWarehousesResponse
    {
        /// <summary>
        /// 仓库列表
        /// </summary>
        public List<Warehouse> Warehouses { get; set; } = new List<Warehouse>();
    }

    /// <summary>
    /// 仓库
    /// </summary>
    public class Warehouse
    {
        /// <summary>
        /// 仓库类型
        /// </summary>
        public WarehouseType WarehouseType { get; set; }

        /// <summary>
        /// 仓库类型（名称）
        /// </summary>
        public string CNWarehouseType
        {
            get { return !System.Enum.IsDefined(typeof(WarehouseType), WarehouseType) ? string.Empty : EnumConvert.ToDesc(WarehouseType); }
        }

        /// <summary>
        /// 车间代码
        /// </summary>
        public string WorkshopCode { get; set; }

        /// <summary>
        /// 车间名称
        /// </summary>
        public string WorkshopName { get; set; }

        /// <summary>
        /// 仓库代码
        /// </summary>
        public string WarehouseCode { get; set; }

        /// <summary>
        /// 仓库名称
        /// </summary>
        public string WarehouseName { get; set; }

        /// <summary>
        /// 是否默认仓
        /// </summary>
        public bool IsDefault { get; set; }
    }
}
